home *** CD-ROM | disk | FTP | other *** search
/ Borland JBuilder 6 / jbuilder6.iso / Documents / JAVA Programming / examples / 07 / Point3D.java < prev    next >
Encoding:
Java Source  |  2000-09-08  |  305 b   |  15 lines

  1. class Point3D extends Point { int z;
  2. Point3D(int x, int y, int z) {
  3. super(x ,y);
  4. this.y = y;
  5. this.z = z; } 
  6. Point3D() {
  7. this(-1,-1,-1);
  8.  
  9. public static void main(String    args[]) {
  10. Point3D p = new Point3D(10, 20, 30);
  11. System.out.println( " x = " + p.x + " y = " + p.y + " z = " + p.z);
  12. } }
  13.  
  14.